<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>客户端用户管理</title>
<style type="text/css">
<!--
body {
	background-color: #2E77ED;
}
-->
</style></head>

<body>
<%!
	String username = "";
	String currentPage = "1";
 %>

<div align="center">
<table width="534" border="0" align="center">
  <tr>
    <td width="217"><div align="center"><a href="AddNewsMain.jsp">添加新闻</a> <br />
    </div></td>
    <td width="307"><div align="center"><a href="ShowNews?method=view">查看新闻 </a> </div></td>
  </tr>
</table>

  	<c:choose>
		<c:when test="empty ${pageModel.list}">
			<c:if test="empty ${pageModel.list}"></c:if>
			<div align="center">
			  <p><strong><font size="22" color="ff0000">暂无评论！</font></strong></p>
			  <p>&nbsp;</p>
			</div>
		</c:when>
		<c:otherwise>
			<div align="center"><table border="1" width="800">
					<tr>
					  <td width="77" bgcolor="#33F2E9"><div align="center"><strong>序号</strong></div></td>
					  <td width="440" align="left" bgcolor="#33F2E9"><div align="center"><strong>内容</strong></div></td>
					  <td width="195" bgcolor="#33F2E9"><div align="center"><strong>时间</strong></div></td>
					  <td width="60" bgcolor="#33F2E9"><div align="center"><strong>删除</strong></div></td>
					</tr>
					<c:forEach items="${pageModel.list}" var="comment" varStatus="cul">
						<c:choose>
							<c:when test="${(cul.count) %2 == 0}">
							<tr align="center" bgcolor="#009AD8">
							</c:when>
							<c:otherwise>
							<tr align="center" bgcolor="#FF8040">
						</c:otherwise>
						</c:choose>
						<script language="javascript"> 
							username = ${comment.region};
						</script>
						<td>${cul.count}</td>
						<td>${comment.content}</td>
						<td>${comment.ptime}</td>
						<td><div align="center"><a href="showCommentsServlet?method=commentdelete&currentPage=${pageModel.currentPage}&cid=${comment.cid}&nid=${comment.nid}" >删除</a></div></td>
					</c:forEach>
			</table></div>
		  <div><table width="800" border="1" align="center" bgcolor="#009AD8">

                <tr><td bgcolor="#33F2E9"><div align="right">总记录${pageModel.totalRecords} 当前${pageModel.currentPage} / ${pageModel.totalPage}页 <a href="showCommentsServlet?method=choise&currentPage=${pageModel.previousPage}&nidtmp=${nidtmp}" > 上一页</a> 
			        <a href="showCommentsServlet?method=choise&currentPage=${pageModel.nextPage}&nidtmp=${nidtmp}" > 下一页</a> </div></td></tr>
     
		  </table>
		  <script language="javascript"> 
				currentPage = ${pageModel.currentPage};
			</script>
		  </div>
	  </c:otherwise>
	</c:choose>
	<form action="ManagerClientUserServlet?method=slient&username=${username}" method="post" enctype="multipart/form-data" name="managerClientUserForm" id="managerClientUserForm">
    <table width="800" border="1" align="center">
      <tr>
        <th width="206" height="25" bgcolor="#33F2E9" scope="row"> <div align="center">用 户 名：</div></th>
        <td width="578" height="25" bgcolor="#33F2E9">${username}        </td>
      </tr>
      <tr>
        <th height="25" bgcolor="#33F2E9" scope="row"><div align="center">是否禁言</div></th>
        <td height="25" bgcolor="#33F2E9">
            
          <div align="center">
                <select name="slientSelect" size="1" id="slientSelect">
                  <option value="1">1天
                  <option value="2">2天
                  <option value="7">7天
                  <option value="14">15天
                  <option value="30">30天
                  <option value="-1">永久
                  <option value="0" selected="selected">否
            </select>
          </div></td>
      </tr>
      <tr>
        <th height="25" colspan="2" bgcolor="#33F2E9" scope="row"> <p>&nbsp; </p>
            <p align="center">
              <input type="submit" name="Submit" value="提交" />
              <input name="reset" type="reset" id="reset" value="重置" />
          </p></th>
      </tr>
  </table>
</form>
</body>
</html>
